3.356 \(\int \frac {x^2 (A+B x)}{\sqrt {a+c x^2}} \, dx\)

Optimal. Leaf size=81 \[ -\frac {\sqrt {a+c x^2} (4 a B-3 A c x)}{6 c^2}-\frac {a A \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}}+\frac {B x^2 \sqrt {a+c x^2}}{3 c} \]

[Out]

-1/2*a*A*arctanh(x*c^(1/2)/(c*x^2+a)^(1/2))/c^(3/2)+1/3*B*x^2*(c*x^2+a)^(1/2)/c-1/6*(-3*A*c*x+4*B*a)*(c*x^2+a)
^(1/2)/c^2

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {833, 780, 217, 206} \[ -\frac {\sqrt {a+c x^2} (4 a B-3 A c x)}{6 c^2}-\frac {a A \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}}+\frac {B x^2 \sqrt {a+c x^2}}{3 c} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(A + B*x))/Sqrt[a + c*x^2],x]

[Out]

(B*x^2*Sqrt[a + c*x^2])/(3*c) - ((4*a*B - 3*A*c*x)*Sqrt[a + c*x^2])/(6*c^2) - (a*A*ArcTanh[(Sqrt[c]*x)/Sqrt[a
+ c*x^2]])/(2*c^(3/2))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 780

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(((e*f + d*g)*(2*p
 + 3) + 2*e*g*(p + 1)*x)*(a + c*x^2)^(p + 1))/(2*c*(p + 1)*(2*p + 3)), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(g*(d + e*x)
^m*(a + c*x^2)^(p + 1))/(c*(m + 2*p + 2)), x] + Dist[1/(c*(m + 2*p + 2)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^p*
Simp[c*d*f*(m + 2*p + 2) - a*e*g*m + c*(e*f*(m + 2*p + 2) + d*g*m)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g, p
}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ
[2*m, 2*p]) &&  !(IGtQ[m, 0] && EqQ[f, 0])

Rubi steps

\begin {align*} \int \frac {x^2 (A+B x)}{\sqrt {a+c x^2}} \, dx &=\frac {B x^2 \sqrt {a+c x^2}}{3 c}+\frac {\int \frac {x (-2 a B+3 A c x)}{\sqrt {a+c x^2}} \, dx}{3 c}\\ &=\frac {B x^2 \sqrt {a+c x^2}}{3 c}-\frac {(4 a B-3 A c x) \sqrt {a+c x^2}}{6 c^2}-\frac {(a A) \int \frac {1}{\sqrt {a+c x^2}} \, dx}{2 c}\\ &=\frac {B x^2 \sqrt {a+c x^2}}{3 c}-\frac {(4 a B-3 A c x) \sqrt {a+c x^2}}{6 c^2}-\frac {(a A) \operatorname {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{2 c}\\ &=\frac {B x^2 \sqrt {a+c x^2}}{3 c}-\frac {(4 a B-3 A c x) \sqrt {a+c x^2}}{6 c^2}-\frac {a A \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 c^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 64, normalized size = 0.79 \[ \frac {\sqrt {a+c x^2} (c x (3 A+2 B x)-4 a B)-3 a A \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{6 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(A + B*x))/Sqrt[a + c*x^2],x]

[Out]

(Sqrt[a + c*x^2]*(-4*a*B + c*x*(3*A + 2*B*x)) - 3*a*A*Sqrt[c]*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(6*c^2)

________________________________________________________________________________________

fricas [A]  time = 1.01, size = 127, normalized size = 1.57 \[ \left [\frac {3 \, A a \sqrt {c} \log \left (-2 \, c x^{2} + 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) + 2 \, {\left (2 \, B c x^{2} + 3 \, A c x - 4 \, B a\right )} \sqrt {c x^{2} + a}}{12 \, c^{2}}, \frac {3 \, A a \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) + {\left (2 \, B c x^{2} + 3 \, A c x - 4 \, B a\right )} \sqrt {c x^{2} + a}}{6 \, c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x+A)/(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/12*(3*A*a*sqrt(c)*log(-2*c*x^2 + 2*sqrt(c*x^2 + a)*sqrt(c)*x - a) + 2*(2*B*c*x^2 + 3*A*c*x - 4*B*a)*sqrt(c*
x^2 + a))/c^2, 1/6*(3*A*a*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) + (2*B*c*x^2 + 3*A*c*x - 4*B*a)*sqrt(c*x
^2 + a))/c^2]

________________________________________________________________________________________

giac [A]  time = 0.19, size = 61, normalized size = 0.75 \[ \frac {1}{6} \, \sqrt {c x^{2} + a} {\left ({\left (\frac {2 \, B x}{c} + \frac {3 \, A}{c}\right )} x - \frac {4 \, B a}{c^{2}}\right )} + \frac {A a \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + a} \right |}\right )}{2 \, c^{\frac {3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x+A)/(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/6*sqrt(c*x^2 + a)*((2*B*x/c + 3*A/c)*x - 4*B*a/c^2) + 1/2*A*a*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(3/2)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 75, normalized size = 0.93 \[ \frac {\sqrt {c \,x^{2}+a}\, B \,x^{2}}{3 c}-\frac {A a \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{2 c^{\frac {3}{2}}}+\frac {\sqrt {c \,x^{2}+a}\, A x}{2 c}-\frac {2 \sqrt {c \,x^{2}+a}\, B a}{3 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(B*x+A)/(c*x^2+a)^(1/2),x)

[Out]

1/3*B*x^2*(c*x^2+a)^(1/2)/c-2/3*B*a/c^2*(c*x^2+a)^(1/2)+1/2*A*x/c*(c*x^2+a)^(1/2)-1/2*A*a/c^(3/2)*ln(c^(1/2)*x
+(c*x^2+a)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.48, size = 67, normalized size = 0.83 \[ \frac {\sqrt {c x^{2} + a} B x^{2}}{3 \, c} + \frac {\sqrt {c x^{2} + a} A x}{2 \, c} - \frac {A a \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, c^{\frac {3}{2}}} - \frac {2 \, \sqrt {c x^{2} + a} B a}{3 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x+A)/(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/3*sqrt(c*x^2 + a)*B*x^2/c + 1/2*sqrt(c*x^2 + a)*A*x/c - 1/2*A*a*arcsinh(c*x/sqrt(a*c))/c^(3/2) - 2/3*sqrt(c*
x^2 + a)*B*a/c^2

________________________________________________________________________________________

mupad [B]  time = 1.64, size = 93, normalized size = 1.15 \[ \left \{\begin {array}{cl} \frac {3\,B\,x^4+4\,A\,x^3}{12\,\sqrt {a}} & \text {\ if\ \ }c=0\\ \frac {A\,x\,\sqrt {c\,x^2+a}}{2\,c}-\frac {A\,a\,\ln \left (2\,\sqrt {c}\,x+2\,\sqrt {c\,x^2+a}\right )}{2\,c^{3/2}}-\frac {B\,\sqrt {c\,x^2+a}\,\left (2\,a-c\,x^2\right )}{3\,c^2} & \text {\ if\ \ }c\neq 0 \end {array}\right . \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(A + B*x))/(a + c*x^2)^(1/2),x)

[Out]

piecewise(c == 0, (4*A*x^3 + 3*B*x^4)/(12*a^(1/2)), c ~= 0, - (A*a*log(2*c^(1/2)*x + 2*(a + c*x^2)^(1/2)))/(2*
c^(3/2)) + (A*x*(a + c*x^2)^(1/2))/(2*c) - (B*(a + c*x^2)^(1/2)*(2*a - c*x^2))/(3*c^2))

________________________________________________________________________________________

sympy [A]  time = 4.27, size = 94, normalized size = 1.16 \[ \frac {A \sqrt {a} x \sqrt {1 + \frac {c x^{2}}{a}}}{2 c} - \frac {A a \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{2 c^{\frac {3}{2}}} + B \left (\begin {cases} - \frac {2 a \sqrt {a + c x^{2}}}{3 c^{2}} + \frac {x^{2} \sqrt {a + c x^{2}}}{3 c} & \text {for}\: c \neq 0 \\\frac {x^{4}}{4 \sqrt {a}} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(B*x+A)/(c*x**2+a)**(1/2),x)

[Out]

A*sqrt(a)*x*sqrt(1 + c*x**2/a)/(2*c) - A*a*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2)) + B*Piecewise((-2*a*sqrt(a +
c*x**2)/(3*c**2) + x**2*sqrt(a + c*x**2)/(3*c), Ne(c, 0)), (x**4/(4*sqrt(a)), True))

________________________________________________________________________________________